home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Begleitmaterial / 50Tools / Grafik / PerfectPaint / rexx / Border / Script&Picture / Displace.brx < prev    next >
Text File  |  2002-10-07  |  983b  |  68 lines

  1. /*     arexx Script 
  2. */
  3.  
  4.     options results
  5.     parse ARG Port b
  6.     
  7.     ADDRESS value Port
  8.  
  9.     pp_Progresstext 'Border'
  10.  
  11.     pp_GetWidth
  12.     W=result
  13.     pp_GetHeight
  14.     H=result
  15.     pp_ClosestColor 255 255 255
  16.     White=result
  17.     pp_ClosestColor 0 0 0
  18.     Black=result
  19.  
  20.     pp_StencilOff
  21.     pp_EffectOff
  22.     pp_SpareOnOff
  23.     pp_ComposeReqOff
  24.     pp_Compose 0 100 0
  25.     pp_SetApen Black
  26.     pp_SetBpen White
  27.     pp_Cls
  28.  
  29.     Tot=W+H+5
  30.  
  31.     Do i=0 to W-1 by 2
  32.       pp_Progress i Tot        
  33.         i1=random(5,20,time('S'))
  34.         i2=random(5,20,time('S'))
  35.         i3=trunc(random(0,2,time('S')))
  36.         IF i3=1 then DO
  37.             i1=i1*-1
  38.         END
  39.         pp_Line i 0 i+i1 i2
  40.         pp_Line i H-1 i+i1 H-i2
  41.         
  42.     END
  43.  
  44.     Do i=0 to H-1 by 2
  45.       pp_Progress W+i Tot
  46.         i1=random(5,20,time('S'))
  47.         i2=random(5,20,time('S'))
  48.         i3=trunc(random(0,2,time('S')))
  49.         IF i3=1 then DO
  50.             i1=i1*-1
  51.         END
  52.         pp_Line 0 i i2 i+i1
  53.         pp_Line W-1 i W-i2 i+i1
  54.         
  55.     END
  56.  
  57.   pp_Progress Tot+1 Tot+5
  58.     pp_EffectOn
  59.     pp_Displace 5
  60.     pp_BoxF 0 0 W-1 H-1
  61.     pp_EffectOff
  62.  
  63.   pp_Progress Tot+2 Tot+5
  64.     pp_SparetoStencil
  65.     pp_InvStencil
  66.  
  67.     EXIT
  68.